package com.sushi.bigblog.utils;

/**
 * User: bianpeng
 * Date: 11-12-6
 */
public class LinkedNode<T> {
    private T val;
    private LinkedNode<T> next;

    public LinkedNode(T val) {
        this(val, null);
    }

    public LinkedNode(T val, LinkedNode<T> next) {
        this.val = val;
        this.next = next;
    }

    public static <T> LinkedNode<T> cons(T val, LinkedNode<T> next) {
        return new LinkedNode<T>(val, next);
    }
}
